package com.hongyue.dey03;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class Demo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        byte[] bytes = "逗比欢乐多".getBytes();
        InetAddress byName = InetAddress.getByName("192.168.67.51");
        DatagramPacket dp = new DatagramPacket(bytes,0,bytes.length,byName,9527);
        ds.send(dp);
        ds.close();
    }
}
